import React from 'react';
import ReactDOM from 'react-dom';
// import {HashRouter as Router, Route} from 'react-router-dom'
// 使用自定义路由
import {HashRouter as Router, Route} from './react-router-dom'
// 引入我们需要的模板
// import Home from './component/Home'
// import My from './component/My'

/**
 * router 使用
 * 如果路径匹配，则会渲染模板，如果不匹配，则不会渲染
 * exact: 精确匹配
 */
ReactDOM.render(
    <Router>
        <React.Fragment>
            <Route path="/" component={Home} />
            <Route path="/my" component={My}/>
        </React.Fragment>
    </Router>,
    document.getElementById('root')
);